﻿#pragma once

#include <NFComm/NFShmStl/NFShmBitMap.h>
#include <NFLogicCommon/NFBaseDefine.h>

#include "proto_common_quest.nanopb.h"
#include "NFServerComm/NFServerCommon/NFIDescStoreEx.h"
#include "NFServerComm/NFServerCommon/NFIDescTemplate.h"
#include "NFComm/NFShmStl/NFShmVector.h"
#include "NFLogicCommon/NFDescStoreTypeDefines.h"

#define MAX_QUEST_ID_VALUE 16384

typedef NFShmBitMap<MAX_QUEST_ID_VALUE> QUESTBIT;

class QuestDescEx : public NF_OBJECT_GLOBAL_TEMPLATE_MACRO(QuestDescEx, EOT_CONST_QUEST_DESC_EX_ID, NFIDescStoreEx)
public:
	QuestDescEx();
	virtual ~QuestDescEx();
	int CreateInit();
	int ResumeInit();
public:
	virtual int Load() override;
	virtual int CheckWhenAllDataLoaded() override;
public:
	bool CheckEvent(QuestEvent ev, int iQuestID) const;
private:
	NFShmVector<QUESTBIT, E_QUEST_EVENT_MAX> m_event_map;
};
